package com.example.baseui2.netWork

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import com.example.baseui2.BR
import com.example.baseui2.R
import com.example.baseui2.databinding.ActivityNetWorkBinding
import com.example.baseui2.recycleVIew.RecycleViewActivity
import com.example.baseui2.viewbind.ViewBindActivity
import com.whr.baseui.activity.BaseMvvmActivity

class NetWorkActivity : BaseMvvmActivity<ActivityNetWorkBinding,NetWorkViewModel>() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_net_work)
    }

    override val layoutId: Int
        get() = R.layout.activity_net_work

    override fun initVariableId(): Int {
       return BR.netWorkVM
    }

    override fun initView(rootView: View) {

    }

    fun setOnBtnClick(view: View) {
        when (view.id) {
            R.id.btn_start_net_work -> {
                mViewModel.requestNewsData( "", 1, 20)
            }

        }
    }
}